package com.yishusmt.mobsmt.controller;

import com.yishusmt.mobsmt.check.DataCheck;
import com.yishusmt.mobsmt.utils.MailUtil;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;

/**
 * 异常邮件提醒
 *
 * @author zhangyi
 * @date 2018/8/16 10:16
 */
@Controller
@RequestMapping("/send")
public class SendEmailController {

    @Resource
    private MailUtil mailUtil;

    public static final String email = "zhangyi170cc@163.com";
    /**
     * 异常邮件发送
     *
     */
    @GetMapping("/exception")
    @ApiOperation(value = "发送异常邮件体提醒",httpMethod = "GET")
    public void sendException(){
        mailUtil.sendMessage(email,"服务器异常","用户登录时候，服务器异常关闭");
    }
}
